package com.kunbo.cn.dao.system;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.kunbo.cn.entity.system.BusinessCode;

public interface BusinessCodeDao extends CrudRepository<BusinessCode, Integer> {
//	@Modifying @Query("update Person set email = :email where lastName =:lastName")
//	void updatePersonEmailByLastName(@Param("lastName")String lastName,@Param("email")String email);
	@Modifying
    @Query(value = "update sys_business_code set number=?1,date=?2",nativeQuery = true)
    int updateNumberAndDate(Integer number,String date);
	
	BusinessCode findByTypeAndDate(String type,String date);

}
